package message.handler;

import message.Message;
import net.VirtualQueue;

public class MessageHandler implements Runnable {
	
	private Message message;
	
	public MessageHandler(Message message) {
		this.message = message;
	}
	
	MessageHandler(String xmlString) {
		this(Message.createMessage(xmlString));
	}

	@Override
	public void run() {
		VirtualQueue virtualQueue = VirtualQueue.obtainVirtualQueue();
		virtualQueue.pushHighPriorityMessage(message);
	}

	
}
